<!DOCTYPE html>
<html>
	<head>
		<title></title>
	</head>
	<body>
		<script>
			var users=["qiang","admin","woniuxy","hello"];
			var passes=["1234","2234","3234","4234"];
			
			for(var a=0;a<3;a++)
			{
				var username=prompt("请输入用户名：");
				for(var i=0;i<users.length;i++)
				{   
					if(username==users[i])
					{
						a=2;
						for(var j=0;j<3;j++)
						{
						password=prompt("请输入密码：");
						if(password==passes[i])
						{
							alert("登录成功！");
							break;
						}
					    else
						{
							alert("密码错误！");
						}	
						}
						break;
					}
				    else
					{
						if(i==users.length-1)
						{
							alert("用户名错误！");
						}
					}
				}
				}
			</script>
	</body>
</html>